<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>雷达图</title>
  <script src="/lib/echarts.min.js"></script>
</head>

<body>
  <div id="main" style="height:600px;width:800px;"></div>
  <script>
    const myEcharts = echarts.init(document.getElementById('main'))
    const dataMax = [
      { name: '易用性', value: 100 },
      { name: '功能', value: 100 },
      { name: '拍照', value: 100 },
      { name: '跑分', value: 100 },
      { name: '续航', value: 100 },
    ]
    const option = {
      radar: {
        indicator: dataMax, //最大维度
        shape: 'circle' //最外层形状  默认值 polycom
      },
      series: [
        {
          type: 'radar', //类型为雷达图
          label: { // 标签样式
            show: true, //显示数值
          },
          areaStyle: {//区域面积样式

          },
          data: [
            {
              name: '华为手机',
              value: [80, 90, 80, 82, 90]
            },
            {
              name: '中兴手机',
              value: [72, 82, 75, 70, 78]
            },
          ]
        }
      ]
    }
    myEcharts.setOption(option)
  </script>
</body>

</html>